g_bRecordLog = 0;
local bShowInfo = 1;
local bShowErr = 1;
function MyTricksLog(msg)
	if g_bRecordLog ~= 0 then 
		DEFAULT_CHAT_FRAME:AddMessage(msg);
	end
end

function MyTricksInfo(msg)
	if bShowInfo ~= 0 then 
		DEFAULT_CHAT_FRAME:AddMessage(msg,0.1,1.0,0.1);
	end
end

function MyTricksErr(msg)
	if bShowErr ~= 0 then 
		DEFAULT_CHAT_FRAME:AddMessage(msg,1.0,0.1,0.1);
	end
end

function MyTricksMsg(msg)
	if bShowInfo ~= 0 then 
		DEFAULT_CHAT_FRAME:AddMessage(msg,0.1,0.1,1.0);
	end
end

local function SwitchMyTricksLog()
	if g_bRecordLog == 1 then
		g_bRecordLog = 0;
	else
		g_bRecordLog = 1;
	end
	MyTricksInfo("SwitchMyTricksLog() g_bRecordLog="..g_bRecordLog);
end

SLASH_MyTRICKSLOG1 = "/mytrickslog";
SLASH_MyTRICKSLOG2 = "/mtlog";
SlashCmdList["MyTRICKSLOG"] = SwitchMyTricksLog;